From: Keir Fraser Date: Tue, 20 Jan 2009 13:57:20 +0000 (+0000) Subject: x86_32: Get rid of xenheap_phys_start as it is zero after start of day. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14014^2~44 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dcc70f51c7f9692b43ef6b05826cbcedf2fedef3;p=xen.git x86_32: Get rid of xenheap_phys_start as it is zero after start of day. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 34609ca8cd..04efdc3644 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -98,7 +98,7 @@ unsigned long xen_phys_start; #ifdef CONFIG_X86_32 /* Limits of Xen heap, used to initialise the allocator. */ -unsigned long xenheap_phys_start, xenheap_phys_end; +unsigned long xenheap_initial_phys_start, xenheap_phys_end; #endif extern void arch_init_memory(void); @@ -741,8 +741,8 @@ void __init __start_xen(unsigned long mbi_p) /* Initialise boot heap. */ allocator_bitmap_end = init_boot_allocator(__pa(&_end)); #if defined(CONFIG_X86_32) - xenheap_phys_start = allocator_bitmap_end; - xenheap_phys_end = DIRECTMAP_MBYTES << 20; + xenheap_initial_phys_start = allocator_bitmap_end; + xenheap_phys_end = DIRECTMAP_MBYTES << 20; #else if ( !xen_phys_start ) EARLY_FAIL("Not enough memory to relocate Xen.\n"); @@ -841,9 +841,8 @@ void __init __start_xen(unsigned long mbi_p) #if defined(CONFIG_X86_32) /* Initialise the Xen heap. */ - init_xenheap_pages(xenheap_phys_start, xenheap_phys_end); - nr_pages = (xenheap_phys_end - xenheap_phys_start) >> PAGE_SHIFT; - xenheap_phys_start = xen_phys_start; + init_xenheap_pages(xenheap_initial_phys_start, xenheap_phys_end); + nr_pages = (xenheap_phys_end - xenheap_initial_phys_start) >> PAGE_SHIFT; printk("Xen heap: %luMB (%lukB)\n", nr_pages >> (20 - PAGE_SHIFT), nr_pages << (PAGE_SHIFT - 10)); @@ -1094,7 +1093,7 @@ void arch_get_xen_caps(xen_capabilities_info_t *info) int xen_in_range(paddr_t start, paddr_t end) { #if defined(CONFIG_X86_32) - paddr_t xs = xenheap_phys_start; + paddr_t xs = 0; paddr_t xe = xenheap_phys_end; #else paddr_t xs = __pa(&_start); diff --git a/xen/arch/x86/x86_32/mm.c b/xen/arch/x86/x86_32/mm.c index d19f04f9f0..3d266b28bd 100644 --- a/xen/arch/x86/x86_32/mm.c +++ b/xen/arch/x86/x86_32/mm.c @@ -43,7 +43,7 @@ static unsigned long mpt_size; void *alloc_xen_pagetable(void) { extern int early_boot; - extern unsigned long xenheap_phys_start; + extern unsigned long xenheap_initial_phys_start; unsigned long mfn; if ( !early_boot ) @@ -53,8 +53,8 @@ void *alloc_xen_pagetable(void) return v; } - mfn = xenheap_phys_start >> PAGE_SHIFT; - xenheap_phys_start += PAGE_SIZE; + mfn = xenheap_initial_phys_start >> PAGE_SHIFT; + xenheap_initial_phys_start += PAGE_SIZE; return mfn_to_virt(mfn); } diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index 51337c0b79..9d140ef891 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -339,7 +339,7 @@ extern unsigned int video_mode, video_flags; #ifndef __ASSEMBLY__ extern unsigned long xen_phys_start; #if defined(__i386__) -extern unsigned long xenheap_phys_start, xenheap_phys_end; +extern unsigned long xenheap_phys_end; #endif #endif diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index b10e548db2..a51b4a803e 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -153,8 +153,7 @@ struct page_info #define is_xen_heap_page(page) is_xen_heap_mfn(page_to_mfn(page)) #define is_xen_heap_mfn(mfn) ({ \ unsigned long _mfn = (mfn); \ - ((_mfn >= paddr_to_pfn(xenheap_phys_start)) && \ - (_mfn < paddr_to_pfn(xenheap_phys_end))); \ + (_mfn < paddr_to_pfn(xenheap_phys_end)); \ }) #else #define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap)